package com.knife4jtest.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author stylts
 * @since 2025-10-31
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value="TUser对象", description="用户表")
public class TUser extends Model<TUser> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID，主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "性别：0-未知 1-男 2-女")
    private Boolean sex;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;


    @Override
    public String toString() {
        return "TUser{" +
            "id=" + id +
            ", name=" + name +
            ", password=" + password +
            ", age=" + age +
            ", sex=" + sex +
            ", phone=" + phone +
            ", email=" + email +
        "}";
    }
}
